package com.weipu.common.facade.model;


import android.os.Parcel;
import android.os.Parcelable;

/************************
 * @author Tony
 * @Date:2016-4-18下午1:34:13
 * @描述:通知消息数据模型
 ************************/
public class MessageModel implements Parcelable {

//    "LinkType": "4",
//    "Sku": "0",
//    "NoticeID": "5721a518c8442932d05c2078",
//    "ContentType": "1",
//    "Img": "http://c.dx.com/dms/AppHome/2016/4/20120421142833249_918.jpg",
//    "NoticeType": "1",
//    "Title": "标题",
//    "ContentID": "",
//    "Content": "内容",
//    "LinkUrl": ""
	//用到的常量：
	/**
	 * @描述：点击跳转类型-产品列表
	 */
	public static final int LINKTYPE_PRODUCTLIST = 1;
	/**
	 * @描述：点击跳转类型-产品详情
	 */
	public static final int LINKTYPE_PRODUCTDETAIL = 2;
	/**
	 * @描述：点击跳转类型-网页链接
	 */
	public static final int LINKTYPE_WAPURL = 3;
	/**
	 * @描述：点击跳转类型-文本内容
	 */
	public static final int LINKTYPE_CONTENTTEXT = 4;
	/**
	 * @描述：点击跳转类型-物流详情
	 */
	public static final int LINKTYPE_SHIPPINGDETAIL = 5;
	
	/**
	 * @描述：消息类型－系统消息
	 */
	public static final int NOTICETYPE_SYSTEM = 1;
	/**
	 * @描述：消息类型－活动消息
	 */
	public static final int NOTICETYPE_EVENT = 2;

	/**
	 * @描述：消息类型－物流消息
	 */
	public static final int NOTICETYPE_ORDER = 3;
	
	/**
	 * @描述：点击跳转类型
	 * 1 = ProductList  产品列表
     * 2 = ProductDetail 产品详情
     * 3 = WapUrl  网页链接
     * 4 = ContentText 文本内容
	 */
	private int LinkType;
	/**
	 * @描述：加载产品详情对应的SKU
	 */
	private int Sku;
	/**
	 * @描述：消息的唯一标识
	 */
	private String NoticeID;
	private int ContentType;
	/**
	 * @描述：图片
	 */
	private String Img;
	/**
	 * @描述：消息类型
	 * 1:系统消息
	 * 2:活动消息
	 */
	private int NoticeType;
	/**
	 * @描述：消息标题
	 */
	private String Title;
	private String ContentID;
	/**
	 * @描述：消息内容
	 */
	private String Content;
	/**
	 * @描述：网页地址
	 */
	private String LinkUrl;
	/**
	 * @描述：是否已读标记
	 */
	private boolean isRead;
	/**
	 * @描述：推送目标
	 * 1:全部客户
	 * 2:指定客户
	 */
	private int PushType;
	
	/**
	 * @描述：消息的创建时间
	 */
	private String CreateAt;

	/**
	 * 新增 Order Number
	 * @描述 订单编号
     */
	private String OrderNumber;

	public String getOrderNumber() {
		return OrderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		OrderNumber = orderNumber;
	}

	public String getCreateAt() {
		return CreateAt;
	}
	public void setCreateAt(String createAt) {
		CreateAt = createAt;
	}
	public int getPushType() {
		return PushType;
	}
	public void setPushType(int pushType) {
		PushType = pushType;
	}
	public boolean isRead() {
		return isRead;
	}
	public void setRead(boolean isRead) {
		this.isRead = isRead;
	}
	public int getLinkType() {
		return LinkType;
	}
	public void setLinkType(int linkType) {
		this.LinkType = linkType;
	}
	public int getSku() {
		return Sku;
	}
	public void setSku(int sku) {
		this.Sku = sku;
	}
	public String getNoticeID() {
		return NoticeID;
	}
	public void setNoticeID(String noticeID) {
		this.NoticeID = noticeID;
	}
	public int getContentType() {
		return ContentType;
	}
	public void setContentType(int contentType) {
		this.ContentType = contentType;
	}
	public String getImg() {
		return Img;
	}
	public void setImg(String img) {
		this.Img = img;
	}
	public int getNoticeType() {
		return NoticeType;
	}
	public void setNoticeType(int noticeType) {
		this.NoticeType = noticeType;
	}
	public String getTitle() {
		return Title;
	}
	public void setTitle(String title) {
		this.Title = title;
	}
	public String getContentID() {
		return ContentID;
	}
	public void setContentID(String contentID) {
		this.ContentID = contentID;
	}
	public String getContent() {
		return Content;
	}
	public void setContent(String content) {
		this.Content = content;
	}
	public String getLinkUrl() {
		return LinkUrl;
	}
	public void setLinkUrl(String linkUrl) {
		this.LinkUrl = linkUrl;
	}

	@Override
	public String toString() {
		return "MessageModel{" +
				"LinkType=" + LinkType +
				", Sku=" + Sku +
				", NoticeID='" + NoticeID + '\'' +
				", ContentType=" + ContentType +
				", Img='" + Img + '\'' +
				", NoticeType=" + NoticeType +
				", Title='" + Title + '\'' +
				", ContentID='" + ContentID + '\'' +
				", Content='" + Content + '\'' +
				", LinkUrl='" + LinkUrl + '\'' +
				", isRead=" + isRead +
				", PushType=" + PushType +
				", CreateAt='" + CreateAt + '\'' +
				", OrderNumber='" + OrderNumber + '\'' +
				'}';
	}

	public MessageModel(Parcel source) {
		LinkType = source.readInt();
		Sku = source.readInt();
		NoticeID = source.readString();
		ContentType = source.readInt();
		Img = source.readString();
		NoticeType = source.readInt();
		Title = source.readString();
		ContentID = source.readString();
		Content = source.readString();
		LinkUrl = source.readString();
		isRead = source.readInt()==1?true:false;
		PushType = source.readInt();
		CreateAt = source.readString();
		OrderNumber = source.readString();
	}
	public MessageModel() {}
	public static final Parcelable.Creator<MessageModel> CREATOR = new Creator<MessageModel>() {
		
		@Override
		public MessageModel[] newArray(int size) {
			return new MessageModel[size];
		}
		
		@Override
		public MessageModel createFromParcel(Parcel source) {
			return new MessageModel(source);
		}
	};
	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(LinkType);
		dest.writeInt(Sku);
		dest.writeString(NoticeID);
		dest.writeInt(ContentType);
		dest.writeString(Img);
		dest.writeInt(NoticeType);
		dest.writeString(Title);
		dest.writeString(ContentID);
		dest.writeString(Content);
		dest.writeString(LinkUrl);
		dest.writeInt(isRead?1:0);
		dest.writeInt(PushType);
		dest.writeString(CreateAt);
		dest.writeString(OrderNumber);
	}

}
